package com.hxk;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
/**
 * 微信队列
 * @author Cactus
 */
@Component
@RabbitListener(
		bindings=@QueueBinding(
				exchange=@Exchange(value="${mq.config.exchange}",type=ExchangeTypes.FANOUT),
				value=@Queue(value="${mq.config.queue.sms}", autoDelete="true")
		)
)
public class SmsConsumer {

	@RabbitHandler
	public void process(String msg) {
		System.out.println(".....sms.....Receiver:"+msg);
	}
}
